package cn.cs.mapper;


import cn.cs.common.Dto;
import cn.cs.pojo.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserAddressMapper {
    public List<UserAddress> getUserAddressListById(Map<String, Object> param)throws Exception;

	public List<UserAddress> getUserAddressById(@Param(value = "userId") String userId)throws Exception;

	public UserAddress getUserAddressByOnceId(@Param(value = "id") String id)throws Exception;

	public List<UserAddress> getUserAddressListByMap(Map<String, Object> param)throws Exception;

	public Integer getUserAddressCountByMap(Map<String, Object> param)throws Exception;

	public Integer updateUserAddress(UserAddress userAddress)throws Exception;

	public Integer updateUserAddressByUserId(UserAddress userAddress)throws Exception;

	public Integer deleteUserAddressById(@Param(value = "id") String id)throws Exception;


	public Integer insertUserAddress(UserAddress userAddress)throws Exception;

	public Dto registerAddress(@Param(value = "userId") String userId, @Param(value = "userName") String userName, @Param(value = "userPhone") String userPhone, @Param(value = "addressContent") String addressContent, @Param(value = "area") String area, @Param(value = "addressTypeId") String addressTypeId);

	public Integer updateAddressTypeId(@Param(value = "id") String id)throws Exception;

}
